#ifndef COMPILEROPTIONS_H
#define COMPILEROPTIONS_H

#include <wx/dynarray.h>
#include <wx/intl.h>
#include <wx/string.h>

struct CompOption {
  wxString name;
  wxString option;
  wxString additionalLibs;
  bool enabled;
  wxString category;
  wxString checkAgainst;
  wxString checkMessage;
  wxString supersedes;
  bool     exclusive;
};

WX_DEFINE_ARRAY( CompOption*, OptionsArray );

class CompilerOptions {
  public:
    CompilerOptions();
    CompilerOptions( const CompilerOptions& other );
    CompilerOptions& operator=( const CompilerOptions& other );
    ~CompilerOptions();
    void ClearOptions();
    void AddOption( CompOption* coption, int index = -1 );
    void AddOption( const wxString& name, const wxString& option, const wxString& category = _T( "General" ),
                    const wxString& additionalLibs = wxEmptyString, const wxString& checkAgainst = wxEmptyString,
                    const wxString& checkMessage = wxEmptyString, const wxString& supersedes = wxEmptyString,
                    bool exclusive = false, int index = -1 );
    void RemoveOption( int index );
    unsigned int GetCount() const { return m_Options.GetCount(); }
    CompOption* GetOption( int index ) { return m_Options[index]; }
    CompOption* GetOptionByName( const wxString& name );
    CompOption* GetOptionByOption( const wxString& option );
    CompOption* GetOptionByAdditionalLibs( const wxString& libs );
  protected:
  private:
    OptionsArray m_Options;
};

#endif
